'use strict';

module.exports = appInfo => {
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_pb_123';
  config.view = {
    defaultViewEngine: 'nunjucks',
    mapping: {
        '.html': 'nunjucks',
    },
};
config.session = {
    key: 'AOS_SESS',
    maxAge: 3600 * 1000, // 1小时
    httpOnly: true,
    encrypt: true,
};
config.news = {
    // pageSize: 5,
    port1: '9090',
    port2: '9091',
    serverUrl: '84.12.68.102', //接口公共部分，通过this.config.news访问
};
// config.cors = {

//     }
config.security = {
    csrf: {
        enable: false,
    },

};
//编写
// add your config here
config.middleware = ['filter']; //挂载中间件

return config;
};